<!-- header -->
<div class="topbar">
  <%= link_to root_path, class: 'pure-menu-heading pure-menu-link' do %>
    讲稿网
  <% end %>
  <a href="" class="custom-toggle">
    <s class="bar"></s>
    <s class="bar"></s>
    <s class="bar"></s>
  </a>
</div>
<header class="header clearfix">
  <div class="pure-g pure-menu pure-menu-horizontal custom-can-transform">

    <div class="pure-u-1 header-logo pure-u-md-3-24">
      <%= link_to root_path, class: 'pure-menu-heading pure-menu-link' do %>
        讲稿网
      <% end %>
    </div>

    <ul class="pure-menu-list pure-u-1 pure-u-md-6-24 pure-u-lg-6-24 header-menu">
      <li class="pure-menu-item">
        <%= link_to root_path, class: "pure-menu-link #{active_link('home', controller_name)}" do %>
          首页
        <% end %>
      </li>
      <li class="pure-menu-item">
        <%= link_to "活动", events_path, class: "pure-menu-link #{active_link('events', controller_name)}" %>
      </li>
      <li class="pure-menu-item">
        <%= link_to "标签", tags_path, class: "pure-menu-link #{active_link('tags', controller_name)}" %>
      </li>
    </ul>

    <%= form_tag search_path, method: :get, class: "pure-form pure-u-1 pure-u-md-9-24 pure-u-lg-6-24" do %>
      <%= text_field_tag :keyword, @keyword, class: "pure-u-1", placeholder: "输入关键字搜索" %>
      <%= button_tag type: "submit", class: "pure-button" do %>
        <i class="icon-search"></i>
      <% end %>
    <% end %>

    <% if current_user %>
      <%= render "shared/signed_in_user_navbar_items" %>
    <% else %>
      <%= render "shared/guest_user_navbar_items" %>
    <% end %>

  </div>
</header>
<!-- header END -->
